package com.community.contents.controller;

import com.community.common.core.exception.CommunityException;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

@RestController
@RequestMapping("demo")
public class Demo {

    @PostMapping("demo1")
    public void demo1( Integer map){

        System.out.println("map = " + map);

    }

    @PostMapping("demo2")
    public void demo2(){

        System.out.println("全局异常测试");
        int age = 10/0;

        throw new CommunityException("异常测试");

    }

}
